package dd;

import java.util.List;

/**
 * @ClassName:MsgProcessor
 * @Author: 鹿建文
 * @Date: 2022/4/13  - 15:25
 * @Describe:
 */
public class MsgProcessor{
     private String msg;

    public void setMsg(String msg) {
        this.msg = msg;
    }
       List<MsgFilter> filters=List.of(new HtmlFilter(),new EmojiFilter(),new SencitiveFilter());

    public String process() {
        for (MsgFilter filter:filters){
           msg = filter.process(msg);
        }
        return msg;
    }
}
